#define  _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"
void test1()
{
	SLTNode* plist = NULL;
	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPushFront(&plist, 5);
	SLTPushFront(&plist, 6);
	SLTPushFront(&plist, 7);
	SLTPushFront(&plist, 8);
	SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPrint(plist);

}
void test2()
{
	SLTNode* plist = NULL;
	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPrint(plist);
	SLTInsert(&plist, SLTFind(plist, 2), 20);
	SLTPrint(plist);	
	SLTNode* ret1 = SLTFind(plist, 20);
	SLTInsert(&plist, ret1, 21);
	SLTPrint(plist);
	SLTNode* ret2 = SLTFind(plist, 2);
	SLTErase(&plist, ret2);
	ret2 = NULL;
	SLTPrint(plist);
	SLTDestroy(&plist);
	SLTPrint(plist);
}
int main()
{
	test2();
	return 0;
}